﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Globalization;
using System.Web.Security;

namespace RIS.TMP.WEB.APP.Models
{
    [Table("UserLogin")]
    public class UserLogin
    {
        [Key]
        [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
        public int IdLogin { get; set; }
        [Display(Name = "Username")]
        [Required(ErrorMessage="Please Provide Username", AllowEmptyStrings=false)]
        public string User { get; set; }
        [Required(ErrorMessage = "Please provide password", AllowEmptyStrings = false)]
        [Display(Name = "Password")]
        [DataType(System.ComponentModel.DataAnnotations.DataType.Password)]
        public string Password { get; set; }
        [ForeignKey("CFEmployee")]
        public int EmId { get; set; }
        public string RecordStatus { get; set; }
        public string CreateBy { get; set; }
        public Nullable<System.DateTime> CreateWhen { get; set; }
        public string UpdateBy { get; set; }
        public Nullable<System.DateTime> UpdateWhen { get; set; }

        public virtual CFEmployee CFEmployee { get; set; }
    }
}